<@override name="link">
<link href="${base}/resources/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
</@override>
<@override name="body">
    <body class="gray-bg">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>新建流程</h5>
                    <div class="ibox-tools">
                        <a href="index.html" class="dropdown-toggle" title="返回设置"></a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="submit" method="post" class="form-horizontal">
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                名称
                            </label>
                            <div class="col-sm-8">
                                <input type="text" id="name" name="name" class="form-control"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                文件类型
                            </label>
                            <div class="col-sm-8">
                                <#list fileTypes as type>
                                    <div class="checkbox i-checks col-sm-3">
                                        <label>
                                            <input type="radio" name="fileType" <#if type.code==0> checked="checked"</#if> value="${type.code}"> ${type.message}
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                审核类型
                            </label>
                            <div class="col-sm-8">
                                <#list auditTypes as auditType>
                                    <div class="radio i-checks col-sm-3">
                                        <label>
                                            <input type="radio" name="auditType" <#if auditType.code==1> checked="checked" </#if> value="${auditType.code}">${auditType.message}
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                流程类型
                            </label>
                            <div class="col-sm-8">
                                <#list statuses as status>
                                    <div class="radio i-checks col-sm-3">
                                        <label>
                                            <input type="radio" <#if status.code==1>checked="checked"</#if> name="status" value="${status.code}"/>${status.message}
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                流程表单
                            </label>
                            <div class="col-sm-8">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <td></td>
                                            <td>表单名称</td>
                                            <td>表单类型</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <#list forms as form>
                                            <tr>
                                                <td>
                                                    <div class="checkbox i-checks">
                                                        <label>
                                                            <input type="checkbox" value="${form.id}" name="form">
                                                        </label>
                                                    </div>
                                                </td>
                                                <td>
                                                    ${form.name}
                                                </td>
                                                <td>${form.type}</td>
                                            </tr>
                                        </#list>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                可撤回的步骤
                            </label>
                            <div class="col-sm-8">
                                <#list flows as flow>
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="${flow.id}" name="flow">
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="" class="col-sm-3 control-label">
                                超时处理
                            </label>
                            <div class="col-sm-8">
                                <#list dataTypes as dataType>
                                    <div class="radio i-checks col-sm-3">
                                        <label>
                                            <input type="radio" name="dataType"  <#if dataType.code==0> checked="checked" </#if>  value="${dataType.code}">${dataType.message}
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-4 text-center">
                    <button class="btn btn-primary" type="submit">保存设置</button>
                </div>
            </div>
                    </form>
                </div>
            </div>
        </div>
    </body>
</@override>
<@override name="script">
<script type="text/javascript" src="${base}/resources/admin/js/plugins/iCheck/icheck.min.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/flow.js"></script>
<script type="text/javascript">
    var typeId= "${typeId}";
    Common.checkbox();
    Flow.submit();
</script>
</@override>
<@extends name="../base/main.html"/>